package com.mingke.auth.config;

import cn.hutool.core.date.DateUtil;
import com.qiniu.util.Auth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class QiniuOSSUtils {
    @Autowired
    QiniuOSSConfig config;

    /** 最简单的上传服务*/
    public String SimpleUpload() {
        Auth auth = Auth.create(config.getQiniuAccessKey(), config.getQiniuSecretKey());
        String upToken = auth.uploadToken(config.getQiniuBucketName());
        return upToken;
    }
}
